*log using "C:\WORK\modelresults031307complete.log", replace

*use "C:\WORK\Research-ArticlesInProgress\Colombia coca cultivation with Cate Russler\data\20070312\newcsts031207.dta", clear

*gen poverty_2=poverty*poverty
*gen displaced_2=displaced*displaced
*gen receipt_2=rec100*rec100

*tsset deptid year, yearly
*xi: xtpcse cocax100 l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty i.deptid, het noc 
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 1, pcse) sigsymb(*,**,***)
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 1, beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*
*qui:xi: xtpcse cocax100 l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty i.deptid, het noc 
*vif

*xi: xtpcse cocax100 l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 i.deptid, het noc 
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 2, pcse) sigsymb(*,**,***) append
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 2 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

*xi: xtpcse cocax100 l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 i.deptid, het noc 
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 3, pcse) sigsymb(*,**,***) append
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 3 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

*xi: xtpcse cocax100 l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 i.deptid, het noc 
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 4, pcse) sigsymb(*,**,***) append
*outreg l.cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(Model 4 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

**Prais-winsten regressions
tsset deptid year, yearly
xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty i.deptid, het correlation(ar1) noc 
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW-1, pcse) sigsymb(*,**,***) append
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW-1 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

tsset deptid year, yearly
xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 i.deptid, het correlation(ar1) noc 
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW2, pcse) sigsymb(*,**,***) append
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.poverty_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW2 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

**THIS IS THE TEST WITH THE NEW DISPLACEMENT DATA
tsset deptid year, yearly
xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.perccoderec l.roads l.poverty i.deptid, het correlation(ar1) noc 

tsset deptid year, yearly
xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.perccoderec l.roads l.poverty l.poverty_2 i.deptid, het correlation(ar1) noc 



*xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 i.deptid, het correlation(ar1) noc 
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW3 beta, pcse) sigsymb(*,**,***) append
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.displaced_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW3 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

*xi: xtpcse cocax100 l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 i.deptid, het correlation(ar1) noc 
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 using completeresultsoutreg031307, se coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW4, pcse) sigsymb(*,**,***) append
*outreg l.spraykm2 l.g100000 l.corrupt100 l.pubinfra l.agroecon l.displaced l.rec100 l.roads l.poverty l.receipt_2 using completeresultsoutreg031307, beta coefastr bdec(3) rdec(3) 3aster nolabel ctitle(PW4 beta, pcse) sigsymb(*,**,***) append
*CHOW TEST OF DUMMIES
*testparm _Idep*

*save "C:\WORK\Research-ArticlesInProgress\Colombia coca cultivation with Cate Russler\data\20070312\newcsts031307.dta", replace

